<?php defined('BASEPATH') OR exit('No direct script access allowed');

if ( ! function_exists('lang_current') ) {
	function lang_current(){
		$ci =& get_instance();
		$lang = $ci->session->userdata('ss_lang');
		return $lang['id'];
	}
}
if ( ! function_exists('lang_data') ) {
	function lang_data(){
		$result = array();
		$ci =& get_instance();
		$ci->load->config('language');
		$lang_array = $ci->config->item('supported_languages');
		foreach($lang_array as $key=>$value)
			$result[] = $key;
		return $result;
	}
}
